Meteor.methods({
  // 只验证邮箱是否存在
  validateJustEmail: function(email) {
    let result = Accounts.findUserByEmail(email);
    if (result) {
      return true;
    } else {
      throw new Meteor.Error("EMAIL_NOT_FOUND", "此邮箱还没有被注册");
    }
  },
  // 发送验证邮件
  sendVerificationEmail: function(userId) {
    Accounts.sendVerificationEmail(userId);
    return true;
  }
});
